/*
 * Copyright (c) 2023-2025 elsfs Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.elsfs.cloud.demo;

import org.elsfs.cloud.api.security.service.SecurityUserService;
import org.elsfs.cloud.common.security.core.userdetails.SecurityUser;
import org.elsfs.cloud.common.security.federation.FederatedIdentity;
import org.elsfs.cloud.common.security.federation.FederatedIdentityService;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;

/** 登录用户服务 */
@Component
public class SpringLoginDameSecurityUserService
    implements SecurityUserService<SecurityUser>, FederatedIdentityService {
  @Override
  public SecurityUser loadUserByUsername(String username) throws RuntimeException {
    return null;
  }

  @Override
  public SecurityUser loadUserByPhone(String phone) throws RuntimeException {
    return null;
  }

  @Override
  public SecurityUser loadUserByUserId(String userId) throws RuntimeException {
    return null;
  }

  @Override
  public SecurityUser loadUserByEmail(String email) throws RuntimeException {
    return null;
  }

  @Override
  public SecurityUser geLoginUser() {
    return null;
  }

  @Override
  public SecurityUser loadByUserId(String userId) {
    return null;
  }

  @Override
  public void createUser(UserDetails user) {}

  @Override
  public void updateUser(UserDetails user) {}

  @Override
  public void deleteUser(String username) {}

  @Override
  public void changePassword(String oldPassword, String newPassword) {}

  @Override
  public boolean userExists(String username) {
    return false;
  }

  @Override
  public Mono<UserDetails> findByUsername(String username) {
    return null;
  }

  /**
   * 查询FederatedIdentity
   *
   * @param identifier 第三方应用唯一标识
   * @param identityType 第三方应用名
   * @return {@code null} or FederatedIdentity
   */
  @Override
  public FederatedIdentity loadByIdentifierAndIdentityType(String identifier, String identityType) {
    return null;
  }

  /**
   * 保存 federatedIdentity
   *
   * @param federatedIdentity federatedIdentity
   */
  @Override
  public void save(FederatedIdentity federatedIdentity) {}

  /**
   * 更新 FederatedIdentity
   *
   * @param federatedIdentity federatedIdentity
   * @return federatedIdentity
   */
  @Override
  public FederatedIdentity updateFederatedIdentity(FederatedIdentity federatedIdentity) {
    return null;
  }
}
